export default {
	async onShow() {
		if (this._isShare = true) {
			this._shareCallback && await this._shareCallback()
			this._shareReset()
		}

	},
	onShareAppMessage(options) {
		this._isShare = true
		return {
			title: this._shareTitle || '商品详情', // 默认是小程序的名称(可以写slogan等)
			path: this._shareUrl + this.$paramsObjectToString(this._shareCache),
			imageUrl: this._shareImg || '',
			// success: function() {
			// 	this._shareCallback && this._shareCallback()
			// }
		};
	},
	data() {
		return {
			_isShare: false,
			_shareCache: {},
			_shareUrl: null,
			_shareTitle: null,
			_shareImg: null,
		}
	},
	methods: {
		_shareReset() {
			this._isShare = false
		},
		_shareCallback() {
			return null
		}
	}
}